Controlling Volume Levels
You can use theGetSysBeepVolumeandSetSysBeepVolumefunctions to get and set the volume level of the system alert sound. You can useGetDefaultOutputVolumeandSetDefaultOutputVolumeto get and set the default output volume for a particular output device.
With all of these functions, you specify a volume with a 16-bit value, where 0 represents no volume (that is, silence) and 256 (hexadecimal $0100) represents full volume. The right and left volumes of a stereo sound are encoded as the high word and the low word, respectively, of a 32-bit value. Moreover, it's possible to overdrive a particular volume level if you need to amplify a low signal. For example, the long word $02000200 specifies a volume level of twice full volume on both the left and right channels of a stereo sound.
- IMPORTANT
- These four functions are available only in Sound Manager version 3.0 and later.
![]()
In addition to the four functions described in this section, Sound Manager version 3.0 introduces two new sound commands,
getVolumeCmdandvolumeCmd, that you can use to get and set the volume of a particular sound channel. See page 2-96 for details on these two sound commands; see "Managing Sound Volumes" beginning on page 2-31 for a code listing that uses thevolumeCmdcommand.
Subtopics
- GetSysBeepVolume
- SetSysBeepVolume
- GetDefaultOutputVolume
- SetDefaultOutputVolume